<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title><style>
        #box1{
            border: 1px solid red;
            position: absolute;
            width: 600px;
        }
        p{
            position: absolute;
            top: 300px;
            left: 0px;
        }
        .box2{
            width: 100%;
            height: 100px;
            background-color: aqua;
        }
    </style>
</head>
<body>
    <div id="box1">
       <p>回到顶部</p>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
       <div class="box2">123</div>
    </div>
</body>
<script>
    
</script>
</html>